package com.fy.sys.mapper;

import com.fy.sys.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author hxd
 * @since 2023-06-14
 */
public interface UserMapper extends BaseMapper<User> {

    @Insert("insert into login_code values(#{id}, #{code}, null)")
    public int saveCode(@Param("id") String id, @Param("code") String code);

    @Select("select code from login_code where id = #{id}")
    public Map selectCodeById(String id);

}
